package com.yuanfeng.order.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.order.dto.PaymentVocherDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName OrderPaymentVocherController
 * @Description 支付凭证
 * @Author hyq
 * @Date 2023/6/26 14:43
 * @Version 1.0
 **/
@RestController
@RequestMapping("order/paymentVocher")
public class OrderPaymentVocherController extends BaseController{

    /**
     * 添加支付凭证
     *
     * @param param
     * @return
     */
    @PostMapping("/insert")
    public ResponseResult insertPaymentVocher(@RequestBody PaymentVocherDTO param) {
        ResponseResult result = orderPaymentVocherService.insertPaymentVocher(param);
        return result;
    }

    /**
     * 根据orderId 获取已经上传的支付凭证信息
     *
     * @param param
     * @return
     */
    @PostMapping("/query")
    public ResponseResult querkVocherImages(@RequestBody PaymentVocherDTO param) {
        ResponseResult result = orderPaymentVocherService.querkVocherImages(param);
        return result;
    }
}
